﻿<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="edge">
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1.0,user-scalable=0">
    <meta content="telephone=no" name="format-detection" />
    <meta name="description" content="">
    <meta name="keywords" content="">
    <title>知识库-问题详情</title>
    <link rel="stylesheet" type="text/css" href="css/reset.css">
    <link rel="stylesheet" type="text/css" href="css/global.css">
    <link rel="stylesheet" type="text/css" href="css/media.css">
    <link rel="stylesheet" type="text/css" href="css/loading.css">
    <script type="text/javascript" src="js/lib/loading.js"></script>
</head>

<body id="app">
    <!-- 头部 -->
    <header v-show="!showModal" class="header">
        <!--<a href="javascript:;" title="返回" class="icon back" @click="back();"></a>-->
        <back toback="true"></back>
        <h1>问题详情</h1>
        <a href="javascript:void(0);" title="分享" class="icon shareIcon" @click="share({shareId:info.id,shareTit:info.title},$event);"></a>
        <a href="javascript:void(0);" title="分类" class="icon flIcon" @click="add();"></a>
    </header>

    <!-- 问题详情 -->
    <section v-show="!showModal" class="padT23 padB23" v-cloak>
        <!-- 问题 -->
        <div class="marT24 bgff question">
            <div :class="  info.isClose== 1 ? 'topCont quesCont overQues': 'topCont quesCont' ">
                <h3 class="font26 color22 titles">{{info.title}}</h3>
                <span class="db font24 color72 descText">{{{info.content}}}</span>
                <div class="clearfix askImgBox">
                    <span class="db fl j_6 askImg" v-for='(index, item) in info.contentPicture' track-by="$index">
						<img  v-bind:src="item" alt="" class="loadImg">
					</span>

                </div>
                <span class="db font18 colorB tips">
					<em v-for="info in info.type">{{info.name}}</em>

					<span class="colorb6">{{info.date}}</span>
                </span>
            </div>
            <div class="clearfix marT12 padT24 borderT">
                <img v-bind:src=i nfo.headPic class="fl borderRadius wh45">
                <span class="db fl font20 color72 name">{{info.author}}</span>
                <span class="fr comIcon">{{info.commentCount}}</span>
                <span class="fr view">{{info.readCount}}</span>
            </div>
        </div>
        <template v-if="IsAnswerAdopt==1">
			<!-- 采纳回答 -->
			<div class="pad24 marB12 bgff borderB answer">
				<div class="clearfix">
					<img v-bind:src = AnswerAdopt.headPic class="fl borderRadius wh45">
					<span class="db fl font20 color72 name answerIcon">{{AnswerAdopt.author}}<em class="colorB">({{AnswerAdopt.level}})</em></span>
					<span class="fr font20 line95 colorb6">{{AnswerAdopt.date}}</span>
				</div>
				<span class="db marT24 font24 color21">{{{AnswerAdopt.content}}} </span>
				
				<div class="clearfix marT24 askImgBox">
					<span class="db fl j_6 askImg" v-for='(index, item) in AnswerAdopt.contentPicture' track-by="$index">
						<img v-bind:src="item" alt="" class="loadImg">
					</span>
					<!-- <em class="imgNum">8</em> -->
				</div>
				<div class="clearfix">
					<a href="javascript:;" @click="addComment(AnswerAdopt.id);"><span class="fr comIcon">{{AnswerAdopt.commentCount}}</span></a>
					<span class="fr likeIcon">{{AnswerAdopt.likeCount}}</span>
					<!-- <span class="fr cnIcon">采纳</span> -->
				</div>
			</div>
		</template>
        <!-- 回答 -->
        <ul>
            <li class="pad24 marB12 bgff borderB answer" v-for="info in data | filterBy 0 in 'isAdopt'">
                <div class="clearfix">
                    <img v-bind:src=i nfo.headPic class="fl borderRadius wh45">
                    <!-- 若果是专家，则加多一个class="experts" -->
                    <span class="db fl font20 color72 name" :class="{'experts':info.isExpert==1}">{{info.author}}
						<em class="colorB">({{info.level}})</em>
					</span>
                    <span class="fr font20 line95 colorb6">{{info.date}}</span>
                </div>
                <span class="db marT24 font24 color21">{{{info.content}}}</span>

                <div class="clearfix marT24 askImgBox">
                    <span class="db fl j_6 askImg" v-for='(index, item) in info.contentPicture' track-by="$index">
						<img  v-bind:src="item" alt="" class="loadImg">
					</span>
                    <!-- <em class="imgNum">8</em> -->
                </div>
                <div class="clearfix">
                    <a href="javascript:;" @click="addComment(info.id);"><span class="fr comIcon">{{info.commentCount}}</span></a>
                    <span @click="addLike(info.id,$event)" class="fr likeIcon">{{info.likeCount}}</span>
                    <span class="fr cnIcon" v-if="IsAnswerAdopt==0" @click="addAdopt(info.id)">采纳</span>
                </div>
            </li>
        </ul>

        <a href="javascript:void(0);"  @click="addAnswer(info.id)" :class=" info.isClose== 1 ? 'btnB375 btnGrey' : 'btnB375'">{{info.isClose==1?'问题已完结':'我来作答'}}</a>
    </section>

    <!-- 更多 -->
    <template v-if="addShow==true">
	    <div class="cateBoxBg" @click="add();"></div>
	    <ul class="cateBox">
	    	<li><a href="javascript:void(0);" @click="Collection();return false;">{{isCollection==1?'取消收藏':'收藏'}}</a></li>
	    	<li><a href="javascript:void(0);" @click="addFollow();return false;">{{isFollow==1?'取消关注':'关注'}}</a></li>
	    	<li v-if="info.authorID.length>0"><a href="javascript:void(0);" @click="toHisPage(info.authorID)">查看他的主页</a></li>
	    </ul>
    </template>

    <share :show.sync="showModal"></share>
    <!-- template for the modal component -->
    <script type="x/template" id="share-template">
        <!-- 头部 -->
        <header class="header" v-show="show">
            <a href="javascript:;" title="返回" class="icon back" @click="cancel();"></a>
            <div class="clearfix search-box searchBigBox">
                <input type="button" class="fl search-btn" @click="search();">
                <input type="text" id="searchword" class="search-txt" placeholder="搜索" value="" maxlength="30" v-model="query">
            </div>
            <a href="javascript:void(0);" title="确认" @click='ok();' class="text">确认</a>
        </header>

        <!-- 通讯录 -->
        <section class="padT23 addrBook" v-show="show">
            <div v-for="info in users">
                <span class="db pad24 font18 color72">{{info.type}}</span>
                <ul id='uluser' class="padLR24 bgff">
                    <!-- 选中则加上 class="on" -->
                    <li dataID='{{info.uid}}' class="padTB24 font24 color21 borderB" @click="checked($event);" v-for="info in info.userList | filterBy query in 'uname'">
                        {{info.uname }}
                    </li>
                </ul>
            </div>

        </section>
    </script>

    <script type="text/javascript" src="js/lib/jquery.min.js"></script>
    <script type="text/javascript" src="js/lib/vue.js"></script>

    <script type="text/javascript" src="js/lib/global.js"></script>
    <script type="text/javascript" src="js/lib/alert.js"></script>
    <script type="text/javascript" src="js/scrollbar.js"></script>
    <script type="text/javascript" src="js/app.js"></script>
    <script type="text/javascript" src="js/lib/common.js"></script>
    <script type="text/javascript" src="js/askDetail.js"></script>


</body>

</html>